<div class="title_section">
	 Ajout d'une nouvelle révision: 
</div>
<div align="center" class="section">
<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>


<form action="<?php echo url_for("article/update") ?>" id="editform" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<input type="hidden" name="sf_method" value="put" />
<ul>
<?php $i=0;foreach ($form as $row): ?>
	<?php if(!$row->isHidden()):?>
        <li class="form_label">
            <?php echo $row->renderLabel() ?>
        </li>
        <li class="form_help">
            <?php echo $row->renderHelp() ?>
        </li>
        <li class="form_error">
            <?php echo $row->renderError() ?>
        </li>
    
        <li class="form_row">
			<?php if ($i == 2): ?>
            	<div id="draft_info"></div>
			<?php endif;?>
            <?php echo $row->render() ?>
            
        </li>
    <?php endif;?>
<?php $i++;endforeach; ?>
<?php echo $form->renderHiddenFields() ?>
    <li class="form_button">
        <input type="submit" value="Envoyer" />
    </li>
</ul>
</form>
</div>
<?php echo "
<script>
$('#editform').sisyphus({
    customKeyPrefix: 'ei_draft_', // Prefixe pour les clés du localStorage
    timeout: 5, // Interval de temps pour la sauvegarde
    onSave: function() {draft_update(".$id_asso.")}, // Callback save
    onRestore: function() {draft_load(".$id_asso.")}, // Callback restaurer
    onRelease: function() {draft_update(".$id_asso.")}, // Callback release
    excludeFields: null // Si vous avez des champs à exclure $('textarea') par exemple
 });
</script>" ?>
<script type="text/javascript">
tinyMCE.init({
    mode : "exact",
	elements : 'articles_texte',
	realtive_urls:false,
    theme : "advanced",
       plugins : "jbimages,autolink,lists,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",

        // Theme options
		theme_advanced_buttons1 : "styleselect",
        theme_advanced_buttons2 : "jbimages,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,hr,removeformat,|,sub,sup,|,charmap,emotions,iespell,advhr,|,ltr,rtl",
        theme_advanced_buttons3 : "search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,forecolor,backcolor,|,visualchars,|,insertimage,|,cite,abbr,acronym,|,fullscreen",
        theme_advanced_buttons4 : "tablecontrols",

        // Theme options
		content_css : '../../css/styleselect.css',       
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,
});
</script>

